package cn.iocoder.yudao.module.trade.api.deliverypickstoreimage;

import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
import cn.iocoder.yudao.module.trade.api.deliverypickupstoreimage.DeliveryPickUpStoreImageApi;
import cn.iocoder.yudao.module.trade.api.deliverypickupstoreimage.dto.DeliveryPickUpStoreImageDTO;
import cn.iocoder.yudao.module.trade.dal.dataobject.deliverypickupstoreimage.DeliveryPickUpStoreImageDO;
import cn.iocoder.yudao.module.trade.dal.mysql.deliverypickupstoreimage.DeliveryPickUpStoreImageMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class DeliveryPickUpStoreImageApiImpl implements DeliveryPickUpStoreImageApi {
    @Resource
    private DeliveryPickUpStoreImageMapper pickUpStoreImageMapper;

    @Override
    public int insertDeliverPickUpStoreImage(DeliveryPickUpStoreImageDTO imageDTO) {
        return pickUpStoreImageMapper.insert(BeanUtils.toBean(imageDTO, DeliveryPickUpStoreImageDO.class));
    }

    @Override
    public void insertDeliverPickUpStoreImageBatch(List<DeliveryPickUpStoreImageDTO> imageDTO) {
        pickUpStoreImageMapper.insertBatch(BeanUtils.toBean(imageDTO, DeliveryPickUpStoreImageDO.class));
    }
}
